<?php

namespace App\Services\Java;

use App\Services\Java\JavaClient;
use GuzzleHttp\Exception\GuzzleException;

class JavaService
{
    private JavaClient $client;

    public function __construct(JavaClient $client)
    {
        $this->client = $client;
    }

    /**
     * 创建用户钱包充值地址
     * @param string $uid
     * @return bool|false|string|string[]|null
     * @throws GuzzleException
     */
    public function createWallet(string $uid)
    {
        $url = "/rpc2/address/uid={$uid}";
        return $this->client->request('get', $url);
    }
}
